package cn.ming.leo.utils;

import java.io.Serializable;

public class Message<T> implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4308389749594040329L;

	private Integer code;

	private String detail;

	private T value;

	public Message(T value) {
		this.value = value;
		this.code = 0;
	}
	
	public Message( ) {
	}

	public Message(Integer code, String detail) {
		this.code = code;
		this.detail = detail;
	}

	public Message(Integer code, String detail, T value) {
		super();
		this.code = code;
		this.detail = detail;
		this.value = value;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public T getValue() {
		return value;
	}

	public void setValue(T value) {
		this.value = value;
	}

	@Override
	public String toString() {
		return "Message [code=" + code + ", detail=" + detail + ", value="
				+ value + "]";
	}
	
	
}

